/*StoreInfoOutBatchDetail  出库批次明细*/
import request from "/@/utils/request";
import download from "/@/utils/download.ts";

const StoreInfoOutBatchDetailApi = {

    getPageData(data: any) {
        return request({
            url: "/storeInfoOutBatchDetail/pageData",
            method: "post",
            data,
        });
    },
            getPageDatas(data: any) {
        return request({
            url: "/supplierInfo/pageData",
            method: "post",
            data,
        });
    },
    getDetail(data: any) {
        return request({
            url: "/storeInfoOutBatchDetail/getDetail",
            method: "post",
            data,
        });
    },
         getSupplierTypeList(){
        return request({
            url: "/supplierInfoType/searchByType",
            method: "get",
        });
    },

    save: (data: any) => {
        return request({
            url: "/storeInfoOutBatchDetail/save",
            method: "post",
            data,
        });
    },

    del: (data: any) => {
        return request({
            url: "/storeInfoOutBatchDetail/del",
            method: "post",
            data,
        });
    },
       searchByType: (data: any) => {
        return request({
            url: "/sysDic/searchByType",
            method: "post",
            data,
        });
    },

    updateStatus: (data: any) => {
        return request({
            url: "/storeInfoOutBatchDetail/updateStatus",
            method: "post",
            data,
        });
    },
    pageDataXls:(_searchParam: any,_xlsTitle: any,_xlsName: any,storeType: any) => {
const param = new URLSearchParams()
param.append("_searchParam",JSON.stringify(_searchParam))
param.append("_xlsTitle",_xlsTitle)
       param.append("_xlsName",_xlsName)
           param.append("storeType",storeType)
        return request({
            url: "/storeInfoOutBatchDetail/pageDataXls",
            method: "post",
            responseType: 'blob',
            headersType: 'application/json;charset=UTF-8',
          params:param,
        }).then((res)=> {
            download(res)
        });
    },
};
export default StoreInfoOutBatchDetailApi;
